import { IDataType } from '@/service/type'
import requestUtils from '../../index'

//获取查询数据
export function getPageListData(url: string, queryInfo: any) {
  return requestUtils.post<IDataType>({
    url: url,
    data: queryInfo
  })
}

//删除 /users/id
export function deletePageData(url: string) {
  return requestUtils.delete<IDataType>({
    url: url
  })
}

//新增
export function createPageData(url: string, newData: any) {
  return requestUtils.post<IDataType>({
    url: url,
    data: newData
  })
}

//修改
export function editPageData(url: string, editData: any) {
  return requestUtils.patch<IDataType>({
    url: url,
    data: editData
  })
}
